home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
vb_clk2
/
vbclock.bas
< prev
next >
Wrap
BASIC Source File
|
1995-09-06
|
1KB
|
52 lines
Function GetInfo (InfType As Integer) As String
Select Case InfType
Case 1
GetInfo = " " + Format$(Now, "MMM d") + " "
Case 2
GetInfo = " " + Format$(Now, "h:mm AM/PM") + " "
Case 3
GetInfo = " " + Format$(Now, "ddd") + " "
Case 4
GetInfo = " " + Format$(Now, "dddd") + " "
Case 5
GetInfo = "-"
Case 6
GetInfo = ""
Case 7
GetInfo = " " + Format$(GetFreeSystemResources%(0) / 100, "00%") + " "
Case 8
GetInfo = " " + Format$(GetFreeSpace(0) \ 1024) + " KB" + " "
End Select
End Function
Function Pixels_To_Twips (ByVal N&) As Long
Pixels_To_Twips = Scale_Twip / Scale_Pixel * N&
End Function
Static Function Signed (XNum&) As Integer
If XNum& > 32767 Then
Signed = XNum& - 65536
Else
Signed = XNum&
End If
End Function
Function TrimZeroTerm$ (s$)
Dim temp As String
Dim nullspot As Integer
temp = String$(1, 0)
nullspot = InStr(s$, temp)
If nullspot = 0 Then
TrimZeroTerm = s$
Else
TrimZeroTerm = Left$(s$, nullspot - 1)
End If
End Function
Function Twips_To_Pixels (ByVal N&) As Long
Twips_To_Pixels = Scale_Pixel / Scale_Twip * N&
End Function